package com.lzy.okgo.harmony.model.base;

import java.io.Serializable;
import java.util.List;

/**
 * 分页数据模型
 */
public class PageModel<T> implements Serializable {
    private static final long serialVersionUID = 1541574974826606917L;

    /**
     * 当前页码，从1开始
     */
    private int curPage;
    /**
     * 页码，从0开始
     */
    private int offset;
    /**
     * 数据列表
     */
    private List<T> datas;
    /**
     * 是否没有下一页
     */
    private boolean over;
    /**
     * 一共多少页
     */
    private int pageCount;
    /**
     * 一页多少条
     */
    private int size;
    /**
     * 数据的总条数
     */
    private int total;

    public int getCurPage() {
        return curPage;
    }

    public void setCurPage(int curPage) {
        this.curPage = curPage;
    }

    public int getOffset() {
        return offset;
    }

    public void setOffset(int offset) {
        this.offset = offset;
    }

    public List<T> getDatas() {
        return datas;
    }

    public void setDatas(List<T> datas) {
        this.datas = datas;
    }

    public boolean isOver() {
        return over;
    }

    public void setOver(boolean over) {
        this.over = over;
    }

    public int getPageCount() {
        return pageCount;
    }

    public void setPageCount(int pageCount) {
        this.pageCount = pageCount;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    @Override
    public String toString() {
        return "PageModel{" +
                "curPage=" + curPage +
                ", offset=" + offset +
                ", datas=" + datas +
                ", over=" + over +
                ", pageCount=" + pageCount +
                ", size=" + size +
                ", total=" + total +
                '}';
    }
}